<div class="row form-group">
    <div class="{{$viewClass['label']}} "><label class="control-label pull-right">{!! $label !!}</label></div>
    <div class="{{$viewClass['field']}}">
        @include('admin::form.error')

        <span name="{{$column}}"></span> {{-- 用于显示错误信息 --}}
        <div id="{{$column}}">
            <div class="{{$column}}-wrapper">
                <div class="{{$column}}-list">
                    @if(isset($data) && !empty($data))
                        @foreach($data as $pk => $da)
                            <div class="{{$column}}-item">
                                <div class="form-row mb-3">
                                    <div class="col">
                                        <div class="input-group">
                                            <div class="input-group-prepend">
                                                <div class="input-group-text">单词名称</div>
                                            </div>
                                            <input class="form-control" name="{{$column}}[{{$pk}}][name]" type="text" value="{{$da['name']}}">
                                            <div class="input-group-append">
                                                <button class="btn btn-outline-danger btn-outline-secondary {{$column}}-delete" type="button">
                                                    删除
                                                </button>
                                            </div>
                                        </div>
                                        <div class="input-group">
                                            <div class="input-group-prepend">
                                                <div class="input-group-text">题目文本</div>
                                            </div>
                                            <input class="form-control" name="{{$column}}[{{$pk}}][text]" type="text" value="{{$da['text']}}">
                                        </div>
                                        <div class="input-group">
                                            <div class="input-group-prepend">
                                                <div class="input-group-text">音频文件</div>
                                            </div>
                                            <input type="button" id="loadFileXml_{{$pk}}" value="点击修改" onclick="document.getElementById('file_{{$pk}}').click();" />
                                            <input type="file" style="display:none;" id="file_{{$pk}}" name="{{$column}}[{{$pk}}][mp3]" accept="audio/*" value="{{$da['mp3']}}"/>
                                            <input type="hidden" name="{{$column}}[{{$pk}}][mp3]" value="{{$da['mp3']}}"/>
                                        </div>
                                        <div class="input-group">
                                            <div class="input-group-prepend">
                                                <div class="input-group-text">正确答案</div>
                                            </div>
                                            <input class="form-control" name="{{$column}}[{{$pk}}][answer]" type="text" value="{{$da['answer']}}">
                                        </div>
                                        <div class="input-group">
                                            <div class="input-group-prepend">
                                                <div class="input-group-text">错误答案一</div>
                                            </div>
                                            <input class="form-control" name="{{$column}}[{{$pk}}][error_one]" type="text" value="{{$da['error_one']}}">
                                        </div>
                                        <div class="input-group">
                                            <div class="input-group-prepend">
                                                <div class="input-group-text">错误答案二</div>
                                            </div>
                                            <input class="form-control" name="{{$column}}[{{$pk}}][error_two]" type="text" value="{{$da['error_one']}}">
                                        </div>
                                        <div class="input-group">
                                            <div class="input-group-prepend">
                                                <div class="input-group-text">错误答案三</div>
                                            </div>
                                            <input class="form-control" name="{{$column}}[{{$pk}}][error_three]" type="text" value="{{$da['error_three']}}">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        @endforeach
                    @endif
                </div>
                <div class="form-row mb-3">
                    <div class="col">
                        <button class="btn btn-outline-primary {{$column}}-add" data-key-next="{{isset($data) ? count($data) : 0}}" type="button">
                            新增测试题目
                        </button>
                    </div>
                </div>
            </div>
            <template id="{{$column}}-template">
                <div class="{{$column}}-item">
                    <div class="form-row mb-3">
                        <div class="col">
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <div class="input-group-text">单词名称</div>
                                </div>
                                <input class="form-control" name="{{$column}}[new___KEY__][name]" type="text">
                                <div class="input-group-append">
                                    <button class="btn btn-outline-danger btn-outline-secondary {{$column}}-delete" type="button">
                                        删除
                                    </button>
                                </div>
                            </div>
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <div class="input-group-text">题目文本</div>
                                </div>
                                <input class="form-control" name="{{$column}}[new___KEY__][text]" type="text">
                            </div>
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <div class="input-group-text">音频文件</div>
                                </div>
                                <input class="form-control" name="{{$column}}[new___KEY__][mp3]" type="file" accept="audio/*">
                            </div>
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <div class="input-group-text">正确答案</div>
                                </div>
                                <input class="form-control" name="{{$column}}[new___KEY__][answer]" type="text">
                            </div>
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <div class="input-group-text">错误答案一</div>
                                </div>
                                <input class="form-control" name="{{$column}}[new___KEY__][error_one]" type="text">
                            </div>
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <div class="input-group-text">错误答案二</div>
                                </div>
                                <input class="form-control" name="{{$column}}[new___KEY__][error_two]" type="text">
                            </div>
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <div class="input-group-text">错误答案三</div>
                                </div>
                                <input class="form-control" name="{{$column}}[new___KEY__][error_three]" type="text">
                            </div>
                        </div>
                    </div>
                </div>
            </template>
        </div>
    </div>
</div>